package com.whty.system.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.whty.common.support.Convert;
import com.whty.system.domain.DepotHeadItem;
import com.whty.system.mapper.DepotHeadItemMapper;
import com.whty.system.service.IDepotHeadItemService;

/**
 * 入库明细 服务层实现
 * 
 * @author mario
 * @date 2018-10-31
 */
@Service
public class DepotHeadItemServiceImpl implements IDepotHeadItemService 
{
	@Autowired
	private DepotHeadItemMapper depotHeadItemMapper;

	/**
     * 查询入库明细信息
     * 
     * @param id 入库明细ID
     * @return 入库明细信息
     */
    @Override
	public DepotHeadItem selectDepotHeadItemById(Integer id)
	{
	    return depotHeadItemMapper.selectDepotHeadItemById(id);
	}
	
	/**
     * 查询入库明细列表
     * 
     * @param depotHeadItem 入库明细信息
     * @return 入库明细集合
     */
	@Override
	public List<DepotHeadItem> selectDepotHeadItemList(DepotHeadItem depotHeadItem)
	{
	    return depotHeadItemMapper.selectDepotHeadItemList(depotHeadItem);
	}
	
    /**
     * 新增入库明细
     * 
     * @param depotHeadItem 入库明细信息
     * @return 结果
     */
	@Override
	public int insertDepotHeadItem(DepotHeadItem depotHeadItem)
	{
	    return depotHeadItemMapper.insertDepotHeadItem(depotHeadItem);
	}
	
	/**
     * 修改入库明细
     * 
     * @param depotHeadItem 入库明细信息
     * @return 结果
     */
	@Override
	public int updateDepotHeadItem(DepotHeadItem depotHeadItem)
	{
	    return depotHeadItemMapper.updateDepotHeadItem(depotHeadItem);
	}

	/**
     * 删除入库明细对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
	@Override
	public int deleteDepotHeadItemByIds(String ids)
	{
		return depotHeadItemMapper.deleteDepotHeadItemByIds(Convert.toStrArray(ids));
	}
	
}
